import { _decorator, Component, Node, Vec3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('camera')
export class camera extends Component {
    @property(Node)
    public target: Node = null!;

    start() {

    }

    update(deltaTime: number) {
        this.node.setPosition(new Vec3(this.target.position.x, this.target.position.y, 0))
    }
}


